﻿using System;
using System.Collections.Generic;
using ExpenseSystem.Common.BaseModel;


namespace ExpenseSystem.Model
{
    [TableName("BAS_UNIT")]
    public class UnitModel:NormalModel
    {
        private long _unitgroupid;
        private string _code;
        private string _name;
        private double _rate;
        private double _ratebase;

        public virtual string Code
        {
            get { return _code; }
            set
            {
                if (_code == value)
                    return;
                _code = value;
                if (!PropertyUpdated.Contains("Code"))
                    PropertyUpdated.Add("Code");
            }
        }
        public virtual long UnitGroupId
        {
            get { return _unitgroupid; }
            set
            {
                if (_unitgroupid == value)
                    return;
                _unitgroupid = value;
                if (!PropertyUpdated.Contains("UnitGroupId"))
                    PropertyUpdated.Add("UnitGroupId");
            }
        }
        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (_name == value)
                    return;
                _name = value;
                if (!PropertyUpdated.Contains("Name"))
                    PropertyUpdated.Add("Name");
            }
        }
        public virtual double Rate
        {
            get { return _rate; }
            set
            {
                if (_rate == value)
                    return;
                _rate = value;
                if (!PropertyUpdated.Contains("Rate"))
                    PropertyUpdated.Add("Rate");
            }
        }
        public virtual double RateBase
        {
            get { return _ratebase; }
            set
            {
                if (_ratebase == value)
                    return;
                _ratebase = value;
                if (!PropertyUpdated.Contains("RateBase"))
                    PropertyUpdated.Add("RateBase");
            }
        }
    }
}
